﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewScoreDetails.aspx.cs" Inherits="_Default" MasterPageFile="~/Student/Student.master" Title = "View Score"%>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxNewsControl" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx1" %>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent" >
    <p>
        <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
            Caption="View Score" CssFilePath="~/App_Themes/DevEx/{0}/styles.css" 
            CssPostfix="DevEx" DataSourceID="SqlDataSource1" KeyFieldName="StudentID" 
            Width="100%">
            <Columns>
                <dx:GridViewDataTextColumn FieldName="StudentID" ReadOnly="True" 
                    VisibleIndex="0">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Firstname" VisibleIndex="1">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Lastname" VisibleIndex="2">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataImageColumn FieldName="Painting" VisibleIndex="3">
                    <PropertiesImage ImageHeight="150px" ImageWidth="150px">
                    </PropertiesImage>
                </dx:GridViewDataImageColumn>
                <dx:GridViewDataTextColumn FieldName="Description" VisibleIndex="4">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="Mark" VisibleIndex="5">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataMemoColumn FieldName="Remark" VisibleIndex="6">
                </dx:GridViewDataMemoColumn>
            </Columns>
            <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
        </dx:ASPxGridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Institte_of_Fine_ArtsConnectionString %>" 
            SelectCommand="SELECT Student.StudentID, Student.Firstname, Student.Lastname, Posting.Painting, Posting.Description, Posting.Mark, Posting.Remark FROM Student INNER JOIN Posting ON Student.StudentID = Posting.StudentID WHERE (Posting.CompetitionID = @CompetitionID)">
            <SelectParameters>
                <asp:SessionParameter Name="CompetitionID" SessionField="CompetitionID" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
</asp:Content>